import request from '@/utils/request'

export function getPrinterListApi(params: any) {
  return request({
    url: '/api/printer',
    method: 'get',
    params,
  })
}

export function AddPrinterApi(data: any) {
  return request({
    url: '/api/printer',
    method: 'post',
    data,
  })
}

export function PutPrinterApi(data: any) {
  return request({
    url: `/api/printer/${data.id}`,
    method: 'put',
    data,
  })
}

export function DelPrinterApi(id: any) {
  return request({
    url: `/api/printer/${id}`,
    method: 'delete',
  })
}

export function testPrinterApi(data: any) {
  return request({
    url: `/api/printer/print/test`,
    method: 'post',
    data,
  })
}

export function batchPrinterApi(data: any) {
  return request({
    url: `/api/printer/print/batch`,
    method: 'post',
    data,
  })
}

export function printerLogListApi(params: any) {
  return request({
    url: `/api/printer/log`,
    method: 'get',
    params,
  })
}

export function printerAllListApi(activityId: any) {
  return request({
    url: `/api/printer/all/${activityId}`,
    method: 'get',
  })
}

export function checkAccountAllListApi() {
  return request({
    url: `/api/printer/checkAccountAll`,
    method: 'get',
  })
}

export function AddCheckAccountListApi(data: any) {
  return request({
    url: `/api/printer/checkAccount`,
    method: 'post',
    data,
  })
}

export function checkAccountListApi(params: any) {
  return request({
    url: `/api/printer/checkAccount`,
    method: 'get',
    params,
  })
}

export function exportLogListApi(data: any) {
  return request({
    url: `/api/printer/log/export`,
    method: 'post',
    data,
  })
}
